using System;
using System.Collections.Generic;
using System.Text;
using Decav.Data;

namespace Decav.Gatsb.Web.Pages
{
    /// <summary>
    /// The result returned from an <see cref="IPostsPageAdapter"/>.
    /// </summary>
    public class PostsPageAdapterResult
    {
        public PostsPageAdapterResult(string name, string header,
            PaginationResult<Post> posts)
        {
            if (posts == null)
                throw new ArgumentNullException("posts");

            _posts = posts;
            _header = header;
            _title = title;
        }

        private PaginationResult<Post> _posts;
        private string _title;
        private string _header;

        /// <summary>
        /// Gets the title of the page.
        /// </summary>
        public string PageTitle
        {
            get
            {
                return _title;
            }
        }

        /// <summary>
        /// Gets the header of the page as HTML.
        /// </summary>
        public string PageHeader
        {
            get
            {
                return _header;
            }
        }

        /// <summary>
        /// Gets the posts that are to be bound to the list.
        /// </summary>
        public PaginationResult<Post> Posts
        {
            get
            {
                return _posts;
            }
        }
    }
}
